'use strict';

const body = {
  model: {
    type: 'string',
    required: false,
    trim: true,
    example: 'User',
    description: '查询模型名称'
  }
};

module.exports = {
  modBodyReqprop: {
    ...body,
  },
  modBodyReqall: {
    ...body,
    skip: {
      type: 'number',
      required: false,
      example: 0,
      description: '跳过开头n'
    },
    limit: {
      type: 'number',
      required: false,
      example: 10,
      description: '限制n'
    },
  },
  modBodyReqcql: {
    cql: {
      type: 'string',
      required: false,
      trim: true,
      example: '',
      description: 'cql'
    }
  },
  modBodyReqone: {
    ...body,
    id: {
      type: 'string',
      required: false,
      trim: true,
      example: '2ae3a824-316b-49b8-8ce7-4076c92df22a',
      description: 'UUID'
    }
  },
  modBodyReqadd: {
    ...body,
    name: {
      type: 'string',
      required: false,
      trim: true,
      example: 'test',
      description: '名称'
    },
  },
  modBodyReqaddcol: {
    ...body,
    xxx: {
      type: 'string',
      required: false,
      trim: true,
      example: 'test',
      description: '任意列名称'
    },
  },
  modBodyReqdelcol: {
    ...body,
    xxx: {
      type: 'string',
      required: false,
      trim: true,
      example: 'test',
      description: '任意列名称'
    },
  },
  modBodyRequpd: {
    ...body,
    id: {
      type: 'string',
      required: false,
      trim: true,
      example: '2ae3a824-316b-49b8-8ce7-4076c92df22a',
      description: 'UUID'
    },
    name: {
      type: 'string',
      required: false,
      trim: true,
      example: 'test',
      description: '名称'
    },
  },
  modBodyReqdel: {
    ids: {
      type: 'array',
      required: true,
      itemType: 'number',
      description: 'ids',
      example: ["2ae3a824-316b-49b8-8ce7-4076c92df22a", "973876d0-e189-4040-a141-a6e08b05867e"],
    },
  },
  modBodyReqaddrelate: {
    model_1: {
      type: 'string',
      required: false,
      trim: true,
      example: 'User',
      description: '模型1名称'
    },
    model_1_id: {
      type: 'string',
      required: false,
      trim: true,
      example: '2ae3a824-316b-49b8-8ce7-4076c92df22a',
      description: 'UUID'
    },
    model_2: {
      type: 'string',
      required: false,
      trim: true,
      example: 'Task',
      description: '模型2名称'
    },
    model_2_id: {
      type: 'string',
      required: false,
      trim: true,
      example: '16cd8a9f-7a36-4d27-a6b8-dd849423b1da',
      description: 'UUID'
    },
    relate: {
      type: 'string',
      required: false,
      trim: true,
      example: 'HAS',
      description: '两个关系名称'
    }
  }
};
